#!/bin/bash



commit(){
	echo -e "增加文件......\n"
	git add .
	echo -e "提交文件......\n"
	git commit -m $1
	echo -e "推送文件......\n"
	git push $2 $3
}

echo -e "检测文件状态......\n"
if [ $# != 3 ]
then
echo -e "请输入正确的提交信息,例如：\n"
echo -e "./commit.sh 提交信息 shortname remotename\n"
exit 0
else
	commit $1 $2 $3
fi
